diff -rupN brpc-1.3.0.orig/src/bthread/task_group.cpp brpc-1.3.0/src/bthread/task_group.cpp
--- brpc-1.3.0.orig/src/bthread/task_group.cpp	2022-12-21 22:05:40.833683261 +0000
+++ brpc-1.3.0/src/bthread/task_group.cpp	2022-12-21 22:06:47.413173602 +0000
@@ -248,6 +248,9 @@ int TaskGroup::init(size_t runqueue_capa
     return 0;
 }
 
+#if defined(__aarch64__)
+__attribute__((optimize("O0")))
+#endif
 void TaskGroup::task_runner(intptr_t skip_remained) {
     // NOTE: tls_task_group is volatile since tasks are moved around
     //       different groups.
@@ -567,6 +570,9 @@ void TaskGroup::sched(TaskGroup** pg) {
     sched_to(pg, next_tid);
 }
 
+#if defined(__aarch64__)
+__attribute__((optimize("O0")))
+#endif
 void TaskGroup::sched_to(TaskGroup** pg, TaskMeta* next_meta) {
     TaskGroup* g = *pg;
 #ifndef NDEBUG
